package com.lanou.service;/*
 * @author 马继耿~
 * @date 2023/10/25 10:46
 * @version 1.0
 * */

import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.lanou.mapper.MJG_SelectShopToTopMapper;
import com.lanou.pojo.SelectTopShopTemp;
import com.lanou.service.MJG_SelecctShopToTopService;
import com.lanou.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MJG_SelecctShopToTopServiceImpl implements MJG_SelecctShopToTopService {
    @Autowired
    public MJG_SelectShopToTopMapper mjg_selectShopToTopMapper;
    @Override
    public JsonResult SelectShop(String resourceName) {
        List<SelectTopShopTemp> selectTopShopTemps = mjg_selectShopToTopMapper.SelectTop(resourceName);
        PageInfo<SelectTopShopTemp> selectTopShopTempsPageInfo = new PageInfo<>(selectTopShopTemps);
        JsonResult jsonResult = new JsonResult();
        jsonResult.setData(selectTopShopTempsPageInfo);
        jsonResult.setStatus(200);
        return jsonResult;
    }
}
